/*
 * @Author: your name
 * @Date: 2021-06-01 00:16:38
 * @LastEditTime: 2021-06-01 00:19:37
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \workspace\projects\xmly\src\app\services\tools\page.service.ts
 */
import { Injectable } from '@angular/core';
import { Meta, Title } from '@angular/platform-browser';

@Injectable({
  providedIn: 'root'
})
export class PageService {

  constructor(private title:Title, private meta:Meta) { }
  setPageInfo(title:string, metaDesc:string, keyWord:string):void {
    this.title.setTitle(title);
    this.meta.updateTag({
      name:"keywords",
      content:keyWord
    });
    this.meta.updateTag({
      name: 'description',
      content: metaDesc,
    });
  }
}
